<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/11/10
  Time: 14:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>注册</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css"/>
</head>
<body>
<form action="${pageContext.request.contextPath}/register" method="post">
    <h2 style="text-align: center;">注册</h2>
    <c:if test="${errorCode == -2}">
        <span>未填写账户信息</span>
    </c:if>
    <c:if test="${errorCode == -1}">
        <span>账户已存在</span>
    </c:if>
    <div class="reg">
        <label for="username">个人账号:</label>
        <input type="text" class="field" name="username" id="username" placeholder="账号长度不能少于3位！"/>
    </div>
    <br>
    <div class="reg">
        <label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
        <input type="password" class="field" name="password" id="password" placeholder="密码长度不能少于6位！"/>
    </div>
    <br>
    <div class="reg">
        <label for="password">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</label>
        <input type="text" class="field" name="realName" id="realName" placeholder="真实姓名"/>
    </div>
    <div class="checkbox">
    <label>悬疑</label><input type="checkbox" name="likeType" value="悬疑">
    <label>科幻</label><input type="checkbox" name="likeType" value="科幻">
    <label>网络</label><input type="checkbox" name="likeType" value="网络">
    <label>历史</label><input type="checkbox" name="likeType" value="历史">
    </div>
    <div class="form-item">
        <button type="submit" class="fill" id="submitBtn">注册</button>
    </div>
    <div class="readme">
        <p class="logins">已有账号，立即 <a href="${pageContext.request.contextPath}/login">登录</a></p>
    </div>
</form>
</body>
</html>
